<template>
	<view class="">
		<!-- 物流发货-全款支付订单 -->
		<template v-if="item.send_type == 0 && item.is_prepay == 0">
			<!-- 正常状态 -->
			<template v-if="item.refundstatus == 0 && item.refund.length == 0">
				<view v-if="item.state == 2" class="completeAfter">
					{{ item.wedding.u_type == 1 ? '待发货' : '待确认' }}
				</view>
				<!-- 物流发货全款支付  商家发货后，客户端状态显示为“待收货” -->
				<view v-if="item.state == 3" class="completeAfter">待收货</view>
				<view v-if="item.state == 4" class="completeBefore">已签收</view>
				<view v-if="item.state == 6" class="completeBefore">已完成</view>
				<!-- <view class="completeBefore" v-if="item.state == 5">
					售后中
				</view> -->
				<view class="completeBefore" v-if="item.state == 7">已取消</view>
			</template>
			<!-- 支付取消订单 -->
			<template v-if="item.refundstatus != 0">
				<view class="completeAfter" v-if="item.refundstatus == 1">申请中</view>
				<view class="completeBefore" v-if="item.refundstatus == 2">取消订单已通过</view>
				<view class="completeBefore" v-if="item.refundstatus == 3">取消订单未通过</view>
			</template>
			<!-- 申请退货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 0">
				<view class="completeAfter" v-if="item.refund.state == 0">申请退货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请退货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请退货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6">退款中</view>
				<view class="completeBefore" v-if="item.refund.state == 4">退款成功</view>
			</template>
			<!-- 申请换货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 1">
				<view class="completeAfter" v-if="item.refund.state == 0">申请换货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请换货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请换货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">备货中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">待收货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
			<!-- 申请维修订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 2">
				<view class="completeAfter" v-if="item.refund.state == 0">申请维修中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请维修未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请维修已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">维修中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">待收货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
		</template>
		<!-- 物流发货-定金支付订单 -->
		<template v-if="item.send_type == 0 && item.is_prepay == 1">
			<!-- 正常状态 -->
			<!-- {{item.refund.length}} -->
			<template v-if="item.refundstatus == 0 && item.refund.length == 0">
				<view v-if="item.state == 2" class="completeAfter">
					{{ item.wedding.u_type == 1 ? '待发货' : '待确认' }}
				</view>
				<view v-if="item.state == 3" class="completeAfter">待收货</view>
				<view v-if="item.state == 4" class="completeBefore">已签收</view>
				<view v-if="item.state == 6" class="completeBefore">已完成</view>
				<!-- <view class="completeBefore" v-if="item.state == 5">
					售后中
				</view> -->
				<view class="completeBefore" v-if="item.state == 7">已取消</view>
			</template>
			<!-- 支付取消订单 -->
			<template v-if="item.refundstatus != 0">
				<view class="completeAfter" v-if="item.refundstatus == 1">申请中</view>
				<view class="completeBefore" v-if="item.refundstatus == 2">取消订单已通过</view>
				<view class="completeBefore" v-if="item.refundstatus == 3">取消订单未通过</view>
			</template>
			<!-- 申请退货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 0">
				<view class="completeAfter" v-if="item.refund.state == 0">申请退货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请退货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请退货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6">退款中</view>
				<view class="completeBefore" v-if="item.refund.state == 4">退款成功</view>
			</template>
			<!-- 申请换货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 1">
				<view class="completeAfter" v-if="item.refund.state == 0">申请换货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请换货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请换货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">备货中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">待收货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
			<!-- 申请维修订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 2">
				<view class="completeAfter" v-if="item.refund.state == 0">申请维修中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请维修未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请维修已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">维修中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">待收货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
		</template>
		<!-- 商家配送-全款支付订单 -->
		<template v-if="item.send_type == 1 && item.is_prepay == 0">
			<!-- 正常状态 -->
			<template v-if="item.refundstatus == 0 && item.refund.length == 0">
				<view v-if="item.state == 2" class="completeAfter">
					{{ item.wedding.u_type == 1 ? '待配送' : '待确认' }}
				</view>
				<view v-if="item.state == 3" class="completeAfter">配送中</view>
				<view v-if="item.state == 4" class="completeBefore">已签收</view>
				<view v-if="item.state == 6" class="completeBefore">已完成</view>
				<!-- <view class="completeBefore" v-if="item.state == 5">
					售后中
				</view> -->
				<view class="completeBefore" v-if="item.state == 7">已取消</view>
			</template>
			<!-- 支付取消订单 -->
			<template v-if="item.refundstatus != 0">
				<view class="completeAfter" v-if="item.refundstatus == 1">申请中</view>
				<view class="completeBefore" v-if="item.refundstatus == 2">取消订单已通过</view>
				<view class="completeBefore" v-if="item.refundstatus == 3">取消订单未通过</view>
			</template>
			<!-- 申请退货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 0">
				<view class="completeAfter" v-if="item.refund.state == 0">申请退货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请退货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请退货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6">退款中</view>
				<view class="completeBefore" v-if="item.refund.state == 4">退款成功</view>
			</template>
			<!-- 申请换货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 1">
				<view class="completeAfter" v-if="item.refund.state == 0">申请换货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请换货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请换货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">备货中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">正在送货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
			<!-- 申请维修订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 2">
				<view class="completeAfter" v-if="item.refund.state == 0">申请维修中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请维修未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请维修已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">维修中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">待收货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
		</template>
		<!-- 商家配送-定金支付订单 -->
		<template v-if="item.send_type == 1 && item.is_prepay == 1">
			<!-- 正常状态 -->
			<template v-if="item.refundstatus == 0 && item.refund.length == 0">
				<view v-if="item.state == 2" class="completeAfter">
					{{ item.wedding.u_type == 1 ? '待配送' : '待确认' }}
				</view>
				<view v-if="item.state == 3" class="completeAfter">配送中</view>
				<view v-if="item.state == 4" class="completeBefore">已签收</view>
				<view v-if="item.state == 6" class="completeBefore">已完成</view>
				<!-- <view class="completeBefore" v-if="item.state == 5">
					售后中
				</view> -->
				<view class="completeBefore" v-if="item.state == 7">已取消</view>
			</template>
			<!-- 支付取消订单 -->
			<template v-if="item.refundstatus != 0">
				<view class="completeAfter" v-if="item.refundstatus == 1">申请中</view>
				<view class="completeBefore" v-if="item.refundstatus == 2">取消订单已通过</view>
				<view class="completeBefore" v-if="item.refundstatus == 3">取消订单未通过</view>
			</template>
			<!-- 申请退货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 0">
				<view class="completeAfter" v-if="item.refund.state == 0">申请退货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请退货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请退货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6">退款中</view>
				<view class="completeBefore" v-if="item.refund.state == 4">退款成功</view>
			</template>
			<!-- 申请换货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 1">
				<view class="completeAfter" v-if="item.refund.state == 0">申请换货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请换货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请换货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">备货中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">正在送货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
			<!-- 申请维修订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 2">
				<view class="completeAfter" v-if="item.refund.state == 0">申请维修中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请维修未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请维修已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">维修中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">待收货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
		</template>
		<!-- 到店自提-全款支付订单 -->
		<template v-if="item.send_type == 2 && item.is_prepay == 0">
			<!-- 正常状态 -->
			<template v-if="item.refundstatus == 0 && item.refund.length == 0">
				<view v-if="item.state == 2" class="completeAfter">
					{{ item.wedding.u_type == 1 ? '待取货' : '待确认' }}
				</view>
				<view v-if="item.state == 3" class="completeAfter">待取货</view>
				<view v-if="item.state == 4" class="completeBefore">已签收</view>
				<view v-if="item.state == 6" class="completeBefore">已完成</view>
				<!-- <view class="completeBefore" v-if="item.state == 5">
					售后中
				</view> -->
				<view class="completeBefore" v-if="item.state == 7">已取消</view>
			</template>
			<!-- 支付取消订单 -->
			<template v-if="item.refundstatus != 0">
				<view class="completeAfter" v-if="item.refundstatus == 1">申请中</view>
				<view class="completeBefore" v-if="item.refundstatus == 2">取消订单已通过</view>
				<view class="completeBefore" v-if="item.refundstatus == 3">取消订单未通过</view>
			</template>
			<!-- 申请退货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 0">
				<view class="completeAfter" v-if="item.refund.state == 0">申请退货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请退货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请退货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6">退款中</view>
				<view class="completeBefore" v-if="item.refund.state == 4">退款成功</view>
			</template>
			<!-- 申请换货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 1">
				<view class="completeAfter" v-if="item.refund.state == 0">申请换货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请换货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请换货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">备货中</view>
				<view class="completeBefore" v-if="item.refund.state != 4 && item.refund.refund_state == 2">已交货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
			<!-- 申请维修订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 2">
				<view class="completeAfter" v-if="item.refund.state == 0">申请维修中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请维修未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请维修已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">维修中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">待收货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
		</template>
		<!-- 到店自提-定金支付订单 -->
		<template v-if="item.send_type == 2 && item.is_prepay == 1">
			<!-- 正常状态 -->
			<template v-if="item.refundstatus == 0 && item.refund.length == 0">
				<view v-if="item.state == 2" class="completeAfter">
					{{ item.wedding.u_type == 1 ? '待取货' : '待确认' }}
				</view>
				<view v-if="item.state == 3" class="completeAfter">待取货</view>
				<view v-if="item.state == 4" class="completeBefore">已签收</view>
				<!-- <view class="completeBefore" v-if="item.state == 5">
					售后中
				</view> -->
				<view class="completeBefore" v-if="item.state == 7">已取消</view>
				<view v-if="item.state == 6" class="completeBefore">已完成</view>
			</template>
			<!-- 支付取消订单 -->
			<template v-if="item.refundstatus != 0">
				<view class="completeAfter" v-if="item.refundstatus == 1">申请中</view>
				<view class="completeBefore" v-if="item.refundstatus == 2">取消订单已通过</view>
				<view class="completeBefore" v-if="item.refundstatus == 3">取消订单未通过</view>
			</template>
			<!-- 申请退货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 0">
				<view class="completeAfter" v-if="item.refund.state == 0">申请退货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请退货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请退货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6">退款中</view>
				<view class="completeBefore" v-if="item.refund.state == 4">退款成功</view>
			</template>
			<!-- 申请换货订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 1">
				<view class="completeAfter" v-if="item.refund.state == 0">申请换货中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请换货未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请换货已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">备货中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">已交货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
			<!-- 申请维修订单 -->
			<template v-if="item.refund.length != 0 && item.refund.opre_type == 2">
				<view class="completeAfter" v-if="item.refund.state == 0">申请维修中</view>
				<view class="completeBefore" v-if="item.refund.state == 2">申请维修未通过</view>
				<view class="completeBefore" v-if="item.refund.state == 1 && item.refund.refund_state == 0">申请维修已通过</view>
				<view class="completeAfter" v-if="item.refund.state == 6 && item.refund.refund_state == 0 && !(item.refund.return_sure > 0)">等待商家收货</view>
				<view class="completeAfter" v-if="item.refund.return_sure > 0 && item.refund.state == 6 && item.refund.refund_state != 2">维修中</view>
				<view class="completeAfter" v-if="item.refund.state != 4 && item.refund.refund_state == 2">待收货</view>
				<view class="completeBefore" v-if="item.refund.state == 4">已完成</view>
			</template>
		</template>
	</view>
</template>

<script>
export default {
	props: {
		item: {
			default: {},
			type: Object
		}
	},
	data() {
		return {};
	},
	methods: {}
};
</script>

<style scoped>
.completeAfter {
	font-size: 26rpx;
	color: #ff3f4a;
}
.completeBefore {
	font-size: 26rpx;
	color: #666;
}
</style>
